//
//  model.m
//  bytedancecampus-basic-functions
//
//  Created by Magic Keegan on 8/25/21.
//

#import "model.h"

@implementation model

-(instancetype)initWithJson : (NSString*)jsonString{
    self = [super init];
    NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
    NSError *err;
    _userContent = [NSJSONSerialization JSONObjectWithData:jsonData
                                            options:NSJSONReadingMutableContainers
                                            error:&err];
    if(err){
        NSLog(@"解析失败");
        return nil;
    }
    
    else return self;
}

-(void)showInfo{
    NSLog(@"%@",self.userContent);
}
@end
